/** defineExpose代理 */
export function exposeProxy(elProxy: { [property: string]: any }, el: any) {
  if (!el) {
    return elProxy;
  }
  return new Proxy(elProxy, {
    get: (target, key: string) => {
      if (el.value && el.value[key]) {
        return el.value[key];
      }
      return target[key];
    },
    set(target, key: string, newValue) {
      if (el.value && el.value[key]) {
        el.value[key] = newValue;
        return true;
      }
      return !!target[key];
    }
  });
}